package co.gov.medellin.ssti.sub.model.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import co.gov.medellin.ssti.sub.model.dao.RestriccionDAO;
import co.gov.medellin.ssti.sub.model.dao.exception.DAOException;
import co.gov.medellin.ssti.sub.model.service.RestriccionService;
import co.gov.medellin.ssti.sub.model.vo.RestriccionVO;

@Service
public class RestriccionServiceImpl implements RestriccionService {
	@Autowired
	RestriccionDAO restriccionDAOImpl2;

	public String[] validarRestriccion(String CodigoAtri, String CodRest,
			String Valor, String TipoDato) {
		try {
			return restriccionDAOImpl2.validarRestriccion(CodigoAtri, CodRest,
					Valor, TipoDato);
		} catch (Exception e) {
			throw new DAOException(e);
		}
	}

	public RestriccionVO findRestriccion(String CodRest) {
		try {
			return restriccionDAOImpl2.findRestriccion(CodRest);
		} catch (Exception e) {
			throw new DAOException(e);
		}
	}

	public int modificarRestriccion(String strCodRest, String[] Arr) {
		try {
			return restriccionDAOImpl2.modificarRestriccion(strCodRest, Arr);
		} catch (Exception e) {
			throw new DAOException(e);
		}
	}

}
